package com.cqtczh.qhd.driver.vo;

import java.util.List;
import java.util.Map;

import com.cqtczh.qhd.driver.model.User;

public class JsonResponse {

	String id;
	State state;
	Object data;
    User user;
    String Token;

	public String getToken() {
		return Token;
	}

	public void setToken(String token) {
		Token = token;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public State getState() {
		return state;
	}

	public void setState(State state) {
		this.state = state;
	}

	public Object getData() {
		return data;
	}
	
	public User getUser() {
		return user;
		
	}
	

	public <T> T getParam(String name) {
		if (null == data) {
			return null;
		}
		if (data instanceof Map) {
			return (T) ((Map) data).get(name);
		}
		return (T) data;
	}

	public void setData(Object data) {
		this.data = data;
	}

}
